package org.ysu.shoeShopping.entity;

import java.util.Date;
import java.io.Serializable;

/**
 * 订单表(Orders)实体类
 *
 * @author makejava
 * @since 2025-09-13 15:21:57
 */
public class Orders implements Serializable {
    private static final long serialVersionUID = -72784252206641767L;
/**
     * ID
     */
    private Integer oid;
/**
     * 订单编号
     */
    private String onum;
/**
     * 订单状态
     */
    private Integer ostate;
/**
     * 下单时间
     */
    private Date ordertime;
/**
     * 总价
     */
    private String ototal;
/**
     * 快递跟踪
     */
    private String oexpinfo;
/**
     * 总积分
     */
    private String ointegral;
/**
     * 备注
     */
    private String onote;
/**
     * users外键orm
     */
    private Integer userId;
/**
     * receivers外键orm
     */
    private Integer receiveId;

    // 以下字段用于前端展示，不对应数据库字段
    /**
     * 订单状态（字符串格式，用于前端显示）
     */
    private String status;

    /**
     * 格式化的下单时间
     */
    private String date;

    /**
     * 订单编号（对应onum，用于前端）
     */
    private String orderNumber;

    /**
     * 订单总金额（数值格式）
     */
    private Double totalAmount;

    /**
     * 商品名称
     */
    private String productName;

    /**
     * 商品价格
     */
    private Double productPrice;

    /**
     * 商品数量
     */
    private Integer quantity;

    /**
     * 商品图片
     */
    private String productImage;


    public Integer getOid() {
        return oid;
    }
    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public String getOnum() {
        return onum;
    }

    public void setOnum(String onum) {
        this.onum = onum;
    }

    public Integer getOstate() {
        return ostate;
    }

    public void setOstate(Integer ostate) {
        this.ostate = ostate;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public String getOtotal() {
        return ototal;
    }

    public void setOtotal(String ototal) {
        this.ototal = ototal;
    }

    public String getOexpinfo() {
        return oexpinfo;
    }

    public void setOexpinfo(String oexpinfo) {
        this.oexpinfo = oexpinfo;
    }

    public String getOintegral() {
        return ointegral;
    }

    public void setOintegral(String ointegral) {
        this.ointegral = ointegral;
    }

    public String getOnote() {
        return onote;
    }

    public void setOnote(String onote) {
        this.onote = onote;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getReceiveId() {
        return receiveId;
    }

    public void setReceiveId(Integer receiveId) {
        this.receiveId = receiveId;
    }

    // 新增字段的getter和setter方法
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public Double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Double getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(Double productPrice) {
        this.productPrice = productPrice;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public String getProductImage() {
        return productImage;
    }

    public void setProductImage(String productImage) {
        this.productImage = productImage;
    }

    // 添加便利方法，用于设置前端需要的id字段
    public Integer getId() {
        return this.oid;
    }

    public void setId(Integer id) {
        this.oid = id;
    }

}

